<%--
  Created by IntelliJ IDEA.
  User: Dell
  Date: 2021/11/16
  Time: 10:30
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%String path = request.getContextPath();%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.0</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />

    <link rel="stylesheet" href="<%=path %>/web/index/css/font.css">
    <link rel="stylesheet" href="<%=path %>/web/index/css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="<%=path %>/web/index/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="<%=path %>/web/index/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <script type="text/javascript">
        function save(){
            window.location.href = "sys_dic_pre_save";
        }
        function del(id){
            if(window.confirm('你确定要删除此条数据吗？')){
                window.location.href = "sys_dic_del?id="+id;
                return true;
            }
        }
    </script>


</head>

<body>

<div class="x-body">
    <div class="layui-row" style="text-align: left;">
        <form class="layui-form layui-col-md12 x-so" action="/sys_dic_view" method="post" style="text-align: left;">
            参数KEY：<input type="text" name="dickeys"  placeholder="请输入key" autocomplete="off" value="${dickeys}" class="layui-input">
            <button class="layui-btn"  lay-submit="" lay-filter="sreach" type="submit"><i class="layui-icon">&#xe615;</i></button>
        </form>
    </div>
    <xblock>
        <button class="layui-btn" onclick="save()"><i class="layui-icon"></i>参数设置</button>
        <span class="x-right" style="line-height:40px">共有数据：${rows} 条</span>
    </xblock>
    <table class="layui-table">
        <thead>
        <tr>
            <th>#</th>
            <th>键</th>
            <th>值</th>
            <th>域</th>
            <th>当前状态</th>
            <th>操作</th>
        </thead>
        <tbody>
        <c:forEach items="${list }" var="it" varStatus="vs">
            <tr>
                <td>${vs.count}</td>
                <td>${it.dickeys}</td>
                <td>${it.dicdes}</td>
                <td>${it.dicdomain}</td>
                <td class="td-status">
                    <c:if test="${it.flag == '0'}"><strong style="color: #01AAED;">启用</strong></c:if>
                    <c:if test="${it.flag == '1'}"><strong style="color: darkred;">关闭</strong></c:if>
                </td>
                <td class="td-manage">
                    <c:if test="${it.flag == '1'}">
                        <a  href="sys_dic_update_flag_open?id=${it.id}"  title="开启">
                            <i class="layui-icon" style="font-size: 12px;">&#xe62f;开启
                        </a>
                    </c:if>
                    <c:if test="${it.flag == '0'}">
                    <a href="sys_dic_update_flag_close?id=${it.id}"  title="关闭">
                        <i class="layui-icon">&#xe601;</i>关闭
                    </a>
                    </c:if>
                    <a title="编辑"   href="sys_dic_pre_up?id=${it.id}">
                        <i class="layui-icon">&#xe642;</i>编辑
                    </a>
                    <a title="删除" onclick="del('${it.id}')" href="javascript:;">
                        <i class="layui-icon">&#xe640;</i>删除
                    </a>
                </td>
            </tr>
        </c:forEach>
        </tbody>
    </table>
    <div class="page">
        ${pager }
    </div>

</div>

</body>

</html>
